package com.example.demo.conf;

import org.springframework.boot.bind.YamlConfigurationFactory;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.io.support.PropertySourceFactory;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix="test.ds")
@PropertySource(value="classpath:customs.properties")
public class AutoConfiguration {

	private String userName;
	private String password;
	private String url;
	private String driverClassName;
	
	public void show(){
		System.out.println("userName="+this.userName);
		System.out.println("password="+this.password);
		System.out.println("url="+this.url);
		System.out.println("driverClassName="+this.driverClassName);
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getDriverClassName() {
		return driverClassName;
	}

	public void setDriverClassName(String driverClassName) {
		this.driverClassName = driverClassName;
	}
	
}
